﻿<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>check_turn_server</title>
    <link href="./common/common.css" rel="stylesheet" />
    <script src="./common/jquery-1.10.2.js"></script>
    <script src="./common/common.js"></script>
    <script src="./js/rtc-tools.js"></script>
</head>
<body>
    ip:<input id="ip" value="172.22.47.155" />
    <br />
    port:<input id="port" value="3478" />
    <br />
    user:<input id="user" value="aaaaaa" />
    <br />
    pwd:<input id="pwd" value="bbbbbb" />
    <br />
    <button onclick="check()">check</button>
    <hr />
    <textarea class="width800px height600px scroll" id="log"></textarea>
    <script>
        function check() {
            var iceServer = {
                url: stringFormat("turn:{0}:{1}", ip.value, port.value),
                username: user.value,
                credential: pwd.value,
            };
            var iceServers = {
                iceServers: [
                    iceServer
                ]
            };
            log("var iceServer = " + JSON.stringify(iceServer));
            log("var iceServers = " + JSON.stringify(iceServers));
            checkTurnServer(iceServer);
        }
    </script>
</body>
</html>
